package com.teradata.multi.controller;

import com.teradata.multi.service.MultiService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class MultiController {

    /*@Autowired
    @Qualifier("msvc-m2")*/
    @Resource(name="msvc-${platform.local.serviceNameSuffix}")
    private MultiService multiService;

    @GetMapping("/")
    public String root() {
        log.info("root");
        return "root";
    }

    @GetMapping("/hello")
    public String hello() {
        log.info("hello world");
        return "hello world";
    }

    @GetMapping("/msvc")
    public String reply() {
        return multiService.reply();
    }

}
